/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package barratt.cef.pui.pob;

import barratt.BarrattModelData;
import barratt.provider.Providers;
import cef.pui.pob.Builder;
import cef.pui.pob.URLBasedBuilder;

import java.util.Properties;

/**
 *
 *
 * @version 1.3.0
 * @author Susanta Tewari
 * @history Created on 12/22/12
 * @since 1.3.0
 */
public class Builders {

    private Builders() {}

    /**
     * Builder for interface {@code BarrattModelData}. The available properties are: <ul> <li>{@code
     * barratt.builder.BarrattModelData.url = barratt:xml//URL }<a href="barratt/cef/pui/pob/doc-files/BarrattModelData.xml.txt">file
     * format</a>, must accompany the <a href="barratt/cef/pui/pob/doc-files/BarrattModelData.xsd.txt">schema</a></li> </ul>
     *
     *
     * @param props properties object containing builder properties
     * @param prefix
     * @return a new builder instance for {@code BarrattModelData}
     */
    public static Builder<BarrattModelData> of_BarratModelData_File(final Properties props,
            String prefix) {

        if (prefix == null) prefix = "barratt.builder.BarrattModelData";

        return new URLBasedBuilder<BarrattModelData>(prefix, props) {

            @Override
            protected Class<Providers.BarratModelDataProviderFileBased> getDefaultProviderClass() {
                return Providers.BarratModelDataProviderFileBased.class;
            }
            @Override
            public String getBuilderString() {
                return "NotYetImplemented";
            }
        };
    }
}
